Definition of Terms
Notification Service (NotificationService)
A database entity representing a distinct service or module within the system that delivers notifications. Eg. 'rating'.
Notification Preference (NotificationPreference)
Represents a customer's subscription choice for a specific type of notification from a specific service. Each combination of customer, service, and notification type must be unique.
Customer (Customer)
A user or client of the system who can receive notifications and manage their preferences.
Notification Type (NotificationType)
Enum defining the delivery channel for the notification:
EMAIL: Email notifications.SMS: Text message notifications.
Notification Preference Status (NotificationPreferenceStatus)
Enum representing the customer’s choice:
OPTED_IN: The customer has agreed to receive this type of notification.OPTED_OUT: The customer has declined to receive this type of notification.
Unique Constraint
The combination of customer, notificationService, and notificationType must be unique in the NotificationPreference table. This ensures a customer cannot have multiple preferences for the same type of notification under the same service.
Opt-Out Reason
An optional explanation a customer may provide when opting out of a notification type. Used for internal analytics or user feedback.
Opt-Out Link
A URL allowing users to opt out from a specific notification type without needing to log in. This link typically contains an encrypted token for security.
Token
A secure, encrypted value that encapsulates key data such as customerId, notificationServiceId, and notificationType. Used to identify the opt-out context without exposing sensitive information.
AESEncryption
A utility for encrypting and decrypting tokens used in opt-out links, ensuring secure communication of user intent.
Web App Domain
The base URL of the application used to construct dynamic links such as opt-out URLs.